Picture coding apparatus, picture coding method, and recording medium having picture coding program recorded thereon

ABSTRACT

A plurality of picture frames is arranged as one group according to correlation between picture frames in a picture sequence. Then, a coding mode corresponding to each of the picture frames of the group is determined. Subsequently, preceding is performed according to the coding mode. Then, the coding of a picture is performed by controlling a coding parameter according to a result of the preceding and to the coding mode.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] This invention relates to the improvement of efficiency ofpicture coding of images formed by MPEG-2 video signals, and to digitalbroadcast service, Internet video distribution, and package mediaproduction.

[0003] 2. Description of the Related Art

[0004]FIG. 9 is a process block diagram illustrating a conventionalpicture coding apparatus disclosed in, for example, JP-A-9-93537official gazette.

[0005] In FIG. 9, reference numeral 81 designates a picture framereordering process, 82 denotes a differencing process, 83 designates adiscrete cosine transform (DCT) process, 84 denotes a quantizationprocess, 85 designates an inverse quantization process, 86 denotes aninverse DCT (IDCT), 87 designates an addition process, 88 denotes amotion compensation process, 89 designates a variable length codingprocess, 90 denotes a buffering process, and 91 designates a codingcontrol process.

[0006] Next, processing to be performed at the transmitting side of aconventional picture coding apparatus is described hereinbelow withreference to FIG. 9.

[0007] Picture frames each serving as the unit of coding in a picturesignal 101 are reordered in coded order by performing the picture framereordering process 81. Then, the reordered picture frames are outputted.In the motion compensation process 88, the motion compensationprediction of a coding object pictureframe103 is performed by using oneor more coding picture frames. Thus, a motion vector 104 and a motioncompensation predicted picture frame 105 are generated. In thedifferencing process 82, a prediction error picture frame 106 isgenerated by calculating the difference between the coding objectpicture frame 103 and the motion compensation predicted picture frame105. In the DCT process 83, a DCT is performed on the prediction errorpicture frame 106, so that a set of transform coefficients is generated.In the quantization process 84, quantization is performed on the set oftransform coefficients, so that a set of quantization indexes isgenerated. In the inverse quantization process 85, a set of transformcoefficients is decoded from the set of quantization indexes. In theIDCT process 86, a prediction error picture frame 107 is decoded fromthe set of transform coefficients. In the addition process 87, a codedpicture frame 108 is generated by adding the prediction error pictureframe 107 to the motion compensation predicted picture frame 105. In thevariable length coding process 89, the quantization indexes and themotion vector 104 are variable length coded, so that a coded bit stringis generated. In the buffering process 90, the coded bit string is oncestored. Then, a coded bit string 102 is outputted at a fixed bit rate.In the coding control process 91, the feedback control of the DCTprocess, the quantization process, and the variable length codingprocess is performed by monitoring the buffering state. Incidentally, inthe case of the MPEG-2 video coding method, a series of pixel blocks (ormacroblocks) in a picture frame is referred to as a “slice”. The controlof the quantization is usually performed in slice units.

[0008] Next, interframe prediction comprising the motion compensationprocess 88 and the differencing process 82 is described hereunder.Picture frames in the picture coding according to MPEG-2 standard areclassified into three types, namely, I-pictures, P-pictures, andB-pictures by the manner of performing the interframe prediction. TheI-pictures are picture frames, each of which is coded therein withoutperforming interframe prediction. The P-pictures are picture frames,each of which is interframe prediction coded by using a coded picture ofa past picture frame. The B-pictures are picture frames, each of whichis interframe prediction coded by using both of past and future pictureframes. Therefore, in the case of coding I-pictures, the motioncompensation process 88 and the differencing process 82 are omitted.Consequently, a coding object picture frame directly undergoes the DCTprocess 83.

[0009] Next, the picture frame reordering process 81 is describedhereinbelow. FIG. 10 is a diagram illustrating the reordering of pictureframes. This figure illustrates the comparison between the picture framesequence in displaying order and the picture frame sequence in codedorder. Moreover, this figure illustrates a coding mode corresponding toeach of the picture frames (that is, corresponding to each of the threepicture types, namely, the I-picture, P-pictures, and B-pictures). Asequence of picture frames arranged in displaying order is reordered bythe picture frame reordering process 81 into a sequence of pictureframes arranged in coded order. In the case of the picture codingaccording to MPEG-2 standard, a group-of-pictures (GOP) header can beinserted just before a coded bit string corresponding to an I-picture.In the coded bit string, one GOP consists of pictures included within arange from an I-picture placed just after the GOP header to a pictureplaced immediately before the next GOP header. That is, one GOP includesone or more I-pictures without exception. In the case of an exampleshown in FIG. 10, one GOP consists of 15 picture frames whose pictureframe numbers range from (−1) to 13. Let M (frames) and N (frames)denote the frame interval between a P-picture and an I-picture oranother P-picture, and the number of picture frames composing one GOP,respectively. In the case of FIG. 10, M=3, and N=15. Usually, the valuesof such M and N are fixed. In the aforementioned manner, the coding isperformed by reordering the sequence of picture frames in coded orderand by then carrying out the interframe prediction.

[0010] Further, FIG. 11 is a process block diagram illustrating aconventional picture coding apparatus disclosed in, for example,JP-A-10-313463 official gazette.

[0011] In FIG. 11, reference numeral 200 designates a motion vectordetecting portion, 201 denotes a differential picture generatingportion, 202 designates a unit division portion, 203 denotes an activitycalculating portion, 204 denotes an average unit activity updatingportion, 205 designates a target code amount determining portion, 206denotes a coding portion, 207 designates an allotted code amountupdating portion, and 208 denotes a local decoder.

[0012] Next, processing to be performed at the transmitting side of thispicture coding apparatus is described hereinbelow with reference to FIG.11.

[0013] As shown in FIG. 11, an input picture signal is inputted to boththe motion vector detecting portion 200 and the differential picturegenerating portion 201. The motion vector detecting portion 200 outputsa motion vector according to the picture type of the input picture. Thatis, in the case that the input picture is a P-picture or B-picture, thisportion performs motion vector detection and then outputs a motionvector. In the case that the input picture is an I-picture, this portiondoes not perform motion vector detection.

[0014] In the case that the input picture is a P-picture or B-picture,the differential picture generating portion 201 generates a predictionpicture from both the inputted motion vector and a decoded referencepicture, which is inputted from the local decoder 208. Subsequently, theportion 201 performs a differencing operation on the prediction pictureand the input picture. Then, the portion 201 outputs a differentialpicture. This differential picture is inputted to the unit divisionportion 202, the activity calculating portion 203, and the codingportion 206. Incidentally, in the case that the input picture is anI-picture, the input picture itself is outputted from the differentialpicture generating portion 201, and inputted to the unit divisionportion 202, the activity calculating portion 203, and the codingportion 206.

[0015] The unit division portion 202 defines an I-unit, which consistsof one I-picture and two B-pictures, and a P-unit that consists of oneP-picture and two B-pictures. Further, this portion 202 determinesaccording to the picture type of the inputted differential picture whichof the I-unit and the P-unit the inputted differential picture belongsto. Further, the portion 202 divides the inputted differential imagesinto the units. Then, the portion 202 outputs unit information on eachof the units.

[0016] The activity calculating portion 203 performs an activityoperation on the inputted differential picture, and then outputs a frameactivity. The activity is a measure of complexity of a picture andeasiness of coding.

[0017] This activity is inputted to the target code amount determiningportion 205. Moreover, the activity calculating portion 203 outputs aunit activity of the unit, to which the differential picture belongs,from the unit information thereon. This unit activity is inputted to theaverage unit activity updating portion 204 and the target code amountdetermining portion 205.

[0018] The average unit activity updating portion 204 updates theaverage unit activity of the unit from the inputted unit activity.

[0019] The target code amount determining portion 205 outputs a targetcode amount corresponding to a coded frame according to the inputtedframe activity, the unit activity, the average unit activity, and theallotted code amount.

[0020] The coding portion 206 performs coding on the inputteddifferential picture, based on the inputted target code amount. Then,the portion 206 outputs coded data. Subsequently, the coded data isinputted to the allotted code amount updating portion 207 and the localdecoder 208.

[0021] The allotted code amount updating portion 207 calculates agenerated code amount from the inputted coded data, and updates theallotted code amount.

[0022] The local decoder 208 performs decoding on the inputted codeddata, and generates a decoded picture.

[0023] In this way, the conventional apparatus determines the degree ofcomplexity of a to-be-coded picture frame in terms of the activityaccording to a result of preceding. Then, the conventional apparatussets a target code amount corresponding to the unit of coding control sothat the total amount of generated codes is within a desired codeamount. Thus, the conventional apparatus controls quantizationcharacteristics in coding.

[0024] The conventional picture coding apparatus shown in FIG. 9performs the aforementioned operation, and also performs the feedbackcontrol of coding characteristics by monitoring the amount of codes fora picture frame and a slice, and the buffering state so that a codingbit rate is constant. Thus, in the case of instantaneously varyingscenes and rapidly moving pictures, the time correlation therebetween(namely, between picture frames) and the spatial correlationtherebetween (namely, in a picture frame, for example, between slices)are low. Thus, usually, an amount of actually generated codes largelyexceeds an amount of codes, which is estimated before the coding. Thatis, in the case of coding instantaneously varying scenes and rapidlymoving pictures, the feedback control often cannot follow the actualvariation in the generated code amount and thus fails, with the resultthat the picture quality of coded pictures is deteriorated.

[0025] Further, in the case of the conventional picture coding apparatusillustrated in FIG. 11, the degree of complexity of picture frames to becoded is determined according to a result of preceding. Further, thetarget code amount corresponding to the unit of coding control is set sothat the total amount of generated codes is within a desired codeamount. Thus, the quantization characteristics in coding are controlled.Such a coding method is suitable for coding signals to be stored onstorage media, such as a DVD. However, such a conventional controlmethod is used for controlling mainly the quantization characteristics,so that change of coded picture quality is often visible on the changepoint of quantization characteristics.

[0026] Furthermore, the conventional picture coding apparatus does notcontrol the coding mode (or picture type) and the size of GOP accordingto the characteristics of a picture to be coded, which are estimatedfrom different aspects, for instance, the long-term variation incomplexity of the picture, and the presence or absence of a scenechange. It is, thus, difficult to achieve highly efficient coding bysuppressing the variation in the coding quality within a restrictedrange of amounts of codes.

[0027] Additionally, a feedforward control method of performing thequantization by using all of available quantization characteristics andselecting the quantization characteristic corresponding to an amount ofobtained codes, which is closest to a target code amount, is sometimesemployed for controlling the quantization characteristics. However, inthis case, the conventional apparatus has drawbacks in a very largeamount of operation and a very large circuit size.

SUMMARY OF THE INVENTION

[0028] The present invention is accomplished to eliminate theaforementioned drawbacks of the conventional picture coding apparatuses.

[0029] Accordingly, an object of the present invention is to realizehigh quality coding without failure of control of coding operations evenin the case of coding instantaneously varying scenes and rapidly movingpictures.

[0030] Further, another object of the present invention is to realizehighly efficient coding, by which the characteristics of a to-be-codedpicture can be evaluated from different aspects according to long-termvariation of complexity of the picture and the presence or absence of ascene change and by which variation in the coding quality can besuppressed within a restricted range of amounts of codes.

[0031] According to an aspect of the present invention, there isprovided a picture coding apparatus that comprises group structuredetermining means for setting a plurality of picture frames as one groupaccording to correlation between picture frames in a picture sequenceand for determining a coding mode corresponding to each of the pictureframes of this group, precoding means for performing precoding accordingto the coding mode determined by this group structure determining meanscorrespondingly to each of the picture frames, and coding means forperforming coding of a picture by controlling a coding parameteraccording to a result of precoding, which is obtained by this precedingmeans, and to the coding mode determined by the group structuredetermining means.

[0032] Further, the picture coding apparatus may further comprise scenechange detecting means for evaluating correlation between the pictureframes in the picture sequence and for detecting, when there is a parthaving low interframe correlation, the part as a scene change part. Thegroup structure determining means may be adapted to set the plurality ofpicture frames as one group according to this detected scene changepart.

[0033] Further, the scene change detecting means may be adapted toperform a forward motion compensation interframe prediction and abackward motion compensation interframe prediction on each frame of aninput picture sequence of a plurality of frames and to detect a scenechange by evaluating results of both the forward and backwardpredictions.

[0034] Furthermore, the scene change detecting means may be adapted todetect scene change by calculating a prediction error evaluation valuecorrespondingly to each of the regions of the frames and to evaluate thecalculated prediction error evaluation value correspondingly to each ofthe frames.

[0035] Furthermore, the group structure determining means may set adefault value of the number of frames when the group is constituted.Moreover, when there is a part having low interframe correlation, thegroup structure determining means may set the number of frames of thegroup so that the boundary of the group is located in the part havinglow interframe correlation. Further, when the number of consecutivepicture frames each having high interframe correlation exceeds thedefault value, the group structure determining means may set the numberof frames of the group at a value that is larger than the default value.

[0036] Further, the group structure determining means may be adapted sothat when determining the coding mode of each of the picture frames ofthe group, the group structure determining means sets a frame intervalbetween a unidirectional prediction coded frame and an interframe codedframe and a default value of the frame interval therebetween and allotsa unidirectional motion compensation interframe prediction coding modeto a corresponding picture frame, and also allots a unidirectionalinterframe prediction coding mode preferentially to a picture framewhose unidirectional motion compensation interframe prediction errorevaluation value is less than a predetermined value.

[0037] Furthermore, the preceding means may be adapted to outputactivity corresponding to each of the picture frames as a part of theresult of preceding. Moreover, the coding means may be adapted toperform coding of a picture by controlling the coding parameteraccording to this activity corresponding to each of the picture frames.

[0038] Further, the picture coding apparatus may further comprise codeamount allotting means for allotting a target code amount to each of thepicture frames according to the result of precoding performed by thepreceding means and to the coding mode determined by the group structuredetermining means correspondingly to each of the picture frames of thegroup. Moreover, the coding means may perform the coding of each of thepicture frames by controlling the coding parameter according to thetarget code amount allotted by this code amount allotting means to eachof the picture frames.

[0039] Furthermore, the code amount allotting means may comprise firstcode amount allotting means for allotting a target code amount accordingo the result of preceding performed by the preceding means and to thecoding mode determined by the group structure determining meanscorrespondingly to each of the picture frames of the group, and secondcode amount allotting means for allotting the target code amount, whichis allotted by the first code amount allotting means correspondingly toeach of the picture frames, according to a code amount of each ofregions, which are used in the preceding performed by the precedingmeans, of the picture frames as a target code amount corresponding toeach of regions of the picture frames. Moreover, the coding means myperform the coding by controlling the coding parameter according to thetarget code amount corresponding to each of the picture frames and tothe target code amount corresponding to each of the regions of thepicture frames.

[0040] Further, the code amount allotting means may be adapted to allotan initial value to the target code amount corresponding to each of thepicture frames, and to determine activity corresponding to each of thepicture frames by comparing the allotted initial value of the targetcode amount with an amount of codes, which are obtained by the precedingand generated correspondingly to each of the picture frames, and to seta target code amount corresponding to each of the picture framesaccording to this activity.

[0041] Furthermore, according to another aspect of the presentinvention, there is provided a picture coding method, which comprisesthe steps of constituting a plurality of picture frames as one groupaccording to correlation between picture frames in a picture sequence,determining a coding mode corresponding to each of the picture frames ofthis group, performing preceding according to this coding modedetermined correspondingly to each of the picture frames, and performingcoding of a picture by controlling a coding parameter according to aresult of this preceding and to the determined coding.

[0042] Further, the picture coding method may further comprise the stepsof allotting a target code amount to each of the picture framesaccording to the result of preceding and to the coding mode determinedcorrespondingly to each of the picture frames of the group, andperforming coding of each of the picture frames by controlling thecoding parameter according to this target code amount allotted to eachof the picture frames.

[0043] Furthermore, the picture coding method may further comprises thesteps of allotting a target code amount according to the result ofpreceding and to the coding mode determined correspondingly to each ofthe picture frames of the group, and allotting the target code amountcorresponding to each of the picture frames according to a code amountof each of regions, which are used in the preceding, of the pictureframes as a target code amount corresponding to each of regions of thepicture frames, and performing coding by controlling the codingparameter according to the target code amount corresponding to each ofthe picture frames and to the target code amount corresponding to eachof the regions of the picture frames.

BRIEF DESCRIPTION OF THE DRAWINGS

[0044]FIG. 1 is a block diagram illustrating a picture coding apparatusthat is an embodiment of the present invention.

[0045]FIG. 2 is a diagram illustrating a scene change detecting processin the embodiment of the present invention.

[0046]FIG. 3 is a flowchart illustrating an operation of determining thesize of GOP in the embodiment of the present invention.

[0047]FIG. 4 is a flowchart illustrating an operation of determining acoding mode corresponding to each of picture frames of GOP in theembodiment of the present invention.

[0048]FIG. 5 is a flowchart illustrating an operation of allotting atarget code amount in the embodiment of the present invention.

[0049]FIG. 6 is a diagram illustrating an example of determination ofactivity corresponding to each of the picture frames in the embodimentof the present invention.

[0050]FIG. 7 is a block diagram illustrating the configuration ofanother picture coding apparatus according to the present invention.

[0051]FIG. 8 is a block diagram illustrating the configuration ofanother picture coding apparatus according to the present invention.

[0052]FIG. 9 is a process block diagram illustrating an operation of aconventional picture coding apparatus.

[0053]FIG. 10 is a diagram illustrating an operation of reorderingpicture frames.

[0054]FIG. 11 is a block diagram illustrating the configuration of aconventional picture coding apparatus.

DETAILED DESCRIPTION OF THE PRESENT INVENTION

[0055] Hereinafter, embodiments of picture coding apparatus according tothe present invention will be described hereinbelow.

[0056] First Embodiment

[0057]FIG. 1 is a block diagram illustrating a picture coding apparatusthat is an embodiment of the present invention. In FIG. 1, referencenumeral 11 designates a first scene change detecting portion serving asthe scene change detecting means, 2 denotes a GOP structure detectingportion acting as the group structure determining means, 31 and 32designate first and second code amount allotting portions serving as thecode amount allotting means, 41 denotes a first coding portion servingas the preceding means, and 42 designates a second coding portionserving as the coding means.

[0058] In this embodiment, the correlation between picture framescorresponding to an input picture is evaluated. Then, a picture boundaryhaving low interframe correlation is detected as a transition betweenscenes, namely, a scene change position. The constitution of a GOP isdetermined according to a result of this detection of a scene change andto the correlation between the picture frames. Moreover, the coding modeof each of the picture frames of the GOP is determined. Then, precedingis performed according to the determined constitution of the GOP and tothe determined coding modes. Subsequently, a code amount to be allottedto each of the picture frames is determined according to a result of thepreceding and to a set total code amount or an average code amount perunit time. Moreover, a code amount to be allotted to each of regions ofthe picture frames is determined.

[0059] Thus, the suitable code amounts are finally allotted bydetermining the GOP constitution, which is adapted to characteristics ofthe picture, and the coding mode corresponding to each of the frames andthen performing the preceding thereof. Therefore, as compared with thecase of performing coding by controlling only the target code amount andthe quantization characteristics, a suitable GOP structure can beobtained. Moreover, a suitable code amount can be allotted thereto.Consequently, the long-term variation in complexity of a picture and thevariation in coding quality corresponding to each of picture frames,which depends upon the presence or absence of a scene change, can bemore effectively suppressed. Moreover, highly efficient coding isachieved with high quality within a restricted code amount.

[0060] First, the first scene change detecting portion 11 evaluates thecorrelation between the picture frames of an input picture sequence andthus detects a transition between scenes, namely, a scene changeposition.

[0061] The first scene change detecting portion 11 performs a forwardmotion compensation interframe prediction on each of the frames of theinput picture sequence 101 of N frames. That is, the portion 11 performsa motion compensation interframe prediction on a current frame by usingthe just precedent input picture frame. Thus, the portion 11 calculatesa forward prediction error evaluation value (Ef) corresponding to eachof the frames.

[0062] Furthermore, the first scene change detecting portion 11 performsa backward motion compensation interframe prediction on the inputpicture sequence of N frames. That is, the portion 11 performs a motioncompensation interframe prediction on the current frame by using theimmediately subsequent picture frame. Thus, the portion 11 calculates abackward prediction error evaluation value (Eb) corresponding to each ofthe frames.

[0063] These values Ef and Eb are given by, for instance, a sun ofabsolute values, averages of the sum of absolute values, square sumvalues, or averages of the square sum values of the forward and backwardmotion compensation interframe prediction errors.

[0064] Subsequently, the averages (Av.Ef, Av.Eb) of such values Ef andEb of N frames are calculated. Then, values Efn and Ebn−1, which meetthe following inequalities (1) and (2), are detected.

Efn>Av.Ef+Te  (1)

[0065] (n=1, 2, . . . , N; Te is the threshold value)

Ebn−1>Av.Eb+Te  (2)

[0066] (n=1, 2, . . . , N; Te is the threshold value)

[0067]FIG. 2 shows examples of calculation of the values Ef and Eb.

[0068] In the case that there is a value Efn, which meets the inequality(1), among N frames, a position between an nth frame and the justprecedent frame is a candidate for a scene change position to bedetermined according to the forward motion interframe prediction.Further, in the case that there is a value Ebn−1, which meets theinequality (2), among N frames, a position between an nth frame and theimmediately subsequent frame is a candidate for a scene change positionto be determined according to the backward motion interframe prediction.

[0069] For example, regarding the value Ef, when the values Efi−k andEfi+1 meet the inequality (1), a position between the (i−k−1)th frameand the (i−k)th frame and a position between the ith frame and the(i+1)th frame are candidates for the scene change position. Further,regarding the value Eb, when the value Ebi meets the inequality (2), aposition between the ith frame and the (i+1)th frame is a candidate forthe scene change position.

[0070] Moreover, a position meeting both the inequalities (1) and (2) isdetermined as the scene change position.

[0071] In the case of the example of FIG. 2, regarding the value Ef, theposition between the ith frame and the (i+1)th frame is a candidate forthe scene change position (incidentally, the value Efi+1 is large).Regarding the value Eb, the position between the ith frame and the(i+1)th frame is a candidate for the scene change position(incidentally, the value Ebi is large). As a result, the positionbetween the ith frame and the (i+1)th frame, which meets both theinequalities (1) and (2), is decided as the scene change position.

[0072] Incidentally, in this stage, in the case that only one of theinequalities (1) and (2) holds, the prediction of the input pictureframe is not successfully performed. Furthermore, it is not judged thatthere is a scene change position.

[0073] Incidentally, the threshold values Te used in the inequalities(1) and (2) are preset default values. For instance, the time-dependentvariation of a picture sequence to be coded is relatively large, or inthe case that the scenes are relatively complex, the default values ofthe threshold values Te are set at relatively large values.

[0074] The values Ef and Eb depend upon the properties of the picture.Thus, the accuracy of the scene change detection is enhanced byadjusting the threshold values Te according to the distribution of thevalues Ef and Eb of each picture frame. For instance, the average ofeach of the values Ef and Eb is calculated correspondingly to eachpicture frame. Then, the threshold value Te is set at a value obtainedby multiplying the calculated average by α.

[0075] Further, the scene change position may be detected by calculatingthe degrees |Efn−Efn−1| and |Ebn−Ebn−1| of the values Ef and Eb insteadof the values Ef and Eb, and then performing threshold value decisionoperations.

[0076] Moreover, although it has been described in the foregoingdescription that a position meeting both the predetermined conditionscorresponding to the values Ef and Eb is determined as the scene changeposition, the scene change position may be detected by using only one ofthe values Ef and Eb or only one of the degrees |Efn−Efn−1| and|Ebn−Ebn−1|.

[0077] Furthermore, in the case that two or more scene change positionsare successively detected in N frames, one of the detected scene changepositions, which has the largest prediction pixel evaluation value, maybe determined as a scene change position.

[0078] Further, although it has been described in the foregoingdescription that the detection of the scene change is performedaccording to the prediction error evaluation value corresponding to eachof the picture frames, the detection of the scene change may beperformed by calculating the prediction error evaluation valuecorrespondingly to each of objects or slices of the picture frames andthen comprehensively deciding the presence or absence of a scene changefrom the obtained prediction error evaluation values.

[0079] In the aforementioned way, the scene change is detected.Subsequently, the GOP structure determining portion 2 determines the GOPstructure (namely, the number of picture frames of one GOP and thedecoding mode of each of the picture frames) according to the result ofthe scene change determination performed by the first scene changedetermining portion 11.

[0080] Hereinafter, a method of determining the GOP structure isdescribed.

[0081] The method of determining the GOP structure has two steps,namely, the step of determining the number of the picture frames of aGOP and the step of determining the coding mode corresponding to each ofthe picture frames of the GOP. First, the process of determining thenumber of the picture frames of the GOP is described hereinbelow. Adefault value N (frames) of the number of the picture frames of the GOPis first set. Usually, 1 GOP is comprised of N frames. However, in thecase that a scene change is present in N picture frames, the pictureframes from the first picture frame to the picture frame just precedingthe scene change are gathered in such a manner as to compose 1 GOP.Further, the remaining picture frames from the picture frame immediatelysubsequent to the scene change are gathered in such a way as to composethe next GOP. That is, the GOPs are constituted so that the pictureframe just subsequent to each of the scene changes is the leading one ofthe picture frames of the GOP. Furthermore, in the case that there isalmost no change between the adjacent picture frames over N frames, 1GOP is composed of picture frames of the number that is larger than N.

[0082] In this embodiment, the default value N is equal to the number Nof frames of an input picture sequence, which are used for detecting ascene change in the first scene change detecting portion 11. In the casethat no scene change is detected in the input picture sequence having Nframes in the first scene change detecting portion 11, the default valueN is the number of frames of 1 GOP. Incidentally, in the case that theforward prediction error evaluation value (Ef) and the backwardprediction error evaluation value (Eb) illustrated in FIG. 2 aresufficiently small over N frames, it is judged that still picture framesare consecutively included therein. Thus, the number of frames of 1 GOPis set in such a manner as to be larger than the default value N(frames) so as to prevent the code amount from increasing when I-picturecoding is performed. FIG. 3 shows a flowchart of the aforementionedprocess of determining the size of 1 GOP.

[0083] First, initialization is performed (step 301). In this figure,“i” denotes a result of the scene change determination. In the case thatthere is no scene change, i=0. Conversely, in the case that there is ascene change, “i” indicates the position at which the scene change ispresent. Subsequently, the result of the scene change determinationperformed on the predetermined N frames and the prediction errorevaluation results Ef and Eb are inputted (step 302). Then, it is firstjudged (step 303) whether or not a scene change is present in the Nframes. In the case that no scene change is present (yes), the value ofa parameter “m” is increased by 1 (step 304). Incidentally, theparameter “m” indicates the number of occurrences of N frames in whichno scene change is present. Thereafter, the prediction error evaluationresults Ef and Eb are checked. It is thus judged (step 305) whether ornot the values Ef and Eb are sufficiently small over the N frames. Whenthese values are sufficiently small over the N frames (yes), this is thecase that still picture frames are consecutively arranged. Thus, anincrease in the code amount at the time of performing I-picture codingis prevented by setting the size of 1 GOP in such a manner as to belarger than the number N of the frames. Then, control returns to thedetermination on the next N frames (step 302).

[0084] When it is judged at step 303 that there is no scene change, orwhen it judged at step 305 that the values Ef and Eb are notsufficiently small over the N frames (that is, the correlation betweenthe adjacent frames is not high, similarly as in the case of thepresence of a scene change), the size of 1 GOP is determined at step306. That is, a sum of the number (m×N) of frames of sets of N frames,in which no scene changes occur, and the position “i” of is determinedas the size of 1 GOP.

[0085] In the aforementioned manner, the size of 1 GOP is determined.Subsequently, the coding mode of each of the picture frames of 1 GOP isdetermined.

[0086] The available coding modes are the following three modes, thatis, an intra coding (I-picture) mode, a forward prediction coding(P-picture) mode for performing a forward motion compensationprediction, and a bi-directional prediction coding (B-picture) forperforming both forward and backward motion compensation predictions.Further, the default value of the distance (M (frames)) between theP-picture and the I- or P-picture, and that of the number of pictureframes of 1 GOP (N (frames); 1 GOP=N) are preset.

[0087] First, the leading picture frame of the GOP is in the I-picturemode at all times.

[0088] Subsequently, usually, sets of M frames, the number of which isdetermined as the default value, are assigned to the P-picture mode.However, in this case, the P-picture mode is allotted to picture frameseach having a sufficiently small forward prediction error evaluationvalue (that is, such an evaluation value is less than the presetthreshold value T1p), or pictures having a value, which is obtained bysubtracting the backward prediction error evaluation value (Eb) from theforward prediction error evaluation value (Ef) and less than the presetthreshold value (T2P). Moreover, the B-picture mode is allotted to theremaining picture frames. This is because of facts that the quantity ofnecessary motion vector information in the P-picture mode is low ascompared in the case of the B-picture mode, and that when the predictionerror in the P-picture mode is sufficiently small, the coding is moreefficiently performed by selecting the P-picture mode as compared withthe case of selecting the B-picture.

[0089]FIG. 4 is a flowchart illustrating an operation of determining thecoding mode corresponding to each of the picture frames in such a GOP.

[0090] Incidentally, as described in the foregoing description of thisembodiment, the discontinuity point of a scene is aligned with boundaryof a GOP. Moreover, the I-picture coding is performed on the frame justsubsequent to the scene change at all times. These facilitate access tothe stored coded picture and high-speed search for the discontinuitypoint of a scene, and are convenient to edit a picture by cutting andpasting scenes.

[0091] As a practical example of an operation of determining the size of1 GOP and determining the coding mode corresponding to each of thepicture frames, the case of setting N=15 (frames) and M=3 (frames) asthe default values is described hereinbelow. In the case that no scenechanges are detected in the N frames, 1 GOP consists of 15 frames, thenumber of which is the default value. That is, in the case of theexample illustrated in FIG. 10, the picture frames allotted indisplaying order and having the frame Nos. ranging from (−1) to 13constitute 1 GOP. Further, in the case that the value Ef of each of thepicture frames is larger than the threshold value T, the coding modeallotted to each of the picture frames is as illustrated in FIG. 10.

[0092] Incidentally, in the case that the values Eb and Ef aresufficiently small over 15 frames, and that no scene changes occur inthese 15 frames and the subsequent 15 frames, the number of frames of 1GOP is doubled, namely, is 30 (frames) or more.

[0093] In the case that a scene change is detected between ith frame and(i+1)th frame in the input picture sequence consisting of N frames asillustrated in FIG. 2, the scene change position serves as the boundaryof the GOP. In this case, the picture frames allotted in displayingorder and having the frame Nos. ranging from (−1) to “i” constitute 1GOP.

[0094] The coding mode of the picture frames, whose frame Nos. rangesfrom (−1) to “i”, is the same as the coding mode allotted in the casethat no scene changes are detected. The I-picture mode is allotted tothe (i+1)th frame that is the leading picture frame of the next GOP. Inthe aforementioned way, the GOP structure is determined.

[0095] Next, a precoding operation is described hereinbelow. Asdescribed above, a preceding operation is performed on a GOP suitablegrouped according to the interframe correlation, and the existence of ascene change. Thus, a coding control operation can be performed bydetermining a target code amount for coding according to a resultantcode amount. Consequently, highly efficient coding is achieved with highquality corresponding to each of GOPs, into which picture frames aresuitably grouped, within a restricted code amount.

[0096] Practically, as described above, the preceding is performed inthe first coding portion 41 according to the GOP structure 104determined by the GOP structure determining portion 2, as shown in FIG.1.

[0097] Subsequently, the target code amount 106 used in codingcorrespondingly to each of the picture frames is determined by the firstcode amount allotting portion 31 by utilizing the code amountcorresponding to each of the picture frames (or to each of the pictures)and the coding mode, among code amounts obtained by this preceding.

[0098] Further, the target code amount 107 used in codingcorrespondingly to each of plural pixel blocks (or slices) in thepicture frames is determined by the second code amount allotting portion32 by utilizing the code amount corresponding to each of the pictureframes (or to each of the picture) and the coding mode, among codeamounts obtained by the preceding performed in the first coding portion41.

[0099] Then, the coding is performed according to the GOP structuredetermined by the GOP structure determining portion 2 so that amounts ofgenerated codes meet the conditions concerning the target code amount106 corresponding to each of the picture frames and the target codeamount 107 corresponding to each of the plural pixel blocks (or slices).

[0100] Hereinafter, this preceding operation is described hereinbelow inmore detail.

[0101] First, the preceding is performed in the first coding portion 41according to the GOP structure determined by the GOP structuredetermining portion 2. The quantization characteristics used for thepreceding are preset in each of coding modes.

[0102] Subsequently, the first code amount allotting portion 31determines the target code amount 106 used in the coding correspondinglyto each of the picture frames by utilizing the code amount correspondingto each of the picture frames (or the pictures) and the coding modecorresponding thereto, which are obtained by the preceding. A processflowchart of FIG. 5 illustrates a target code amount allotting operationto be performed in the first code amount allotting portion 31.

[0103] First, the allocation of the initial value of the target codeamount corresponding to each of the picture frames (or to each of thepicture types) is described hereunder. To generalize the description,let N (frames), M (frames), F (frames/s), and Bav (bit/sec) denote thenumber of picture frames of 1 GOP, the frame interval between theP-picture and the I- or P-picture, the frame rate of the input picture,and an average bit rate, respectively. Further, the ratio of the targetcode amount among the I-, P-, and B-pictures is assumed to be kR:R:1.

[0104] Incidentally, in the case that TM5, which is well known as a testmodel algorithm for MPEG-2 video coding system, is used and that M=3,this ratio kR:R:1≈4:2:1.

[0105] At that time, the number of I-pictures per second is F/N(frames/sec). The number of P-pictures per second is (1/M−1/N9(frames/sec). Further, the number of B-pictures per second is F (1−1/M)(frames/sec).

[0106] Let nkR (bits), nR (bits), and n (bits) designate the target codeamounts respectively corresponding to the I-picture, the P-picture, andthe B-picture. Then, the following equation (3) holds:

Bav=nF{R(K/N+1/M−1/N)+1−1/M}  (3)

[0107] From the equation (3), “n” can be obtained. Consequently, thetarget code amounts per picture respectively corresponding to the I-,P-, and B-picture are obtained. For example, in the case that N=15, M=3,kR:R:1=4:2:1, Bav=20×10⁶ (bits/sec), and F=30 (frames/sec), “n” isobtained from the equation (3) as follows:

n=(5/11)×10⁶.

[0108] Therefore, the initial values of the target code amountsrespectively corresponding to the I-, P-, and B-pictures are 1.82(Mbits), 0.91 (Mbits), and 0.45 (Mbits).

[0109] Subsequently, the activity corresponding to each of the pictureframes (or of the pictures) is determined according to a result of thepreceding (step 501).

[0110] As illustrated in FIG. 6, the determination of the activity isperformed according to the initial values of the target code amounts andto the generated code amount, which corresponds to each of the picturesand is obtained by the preceding. That is, the activity is determined bybeing classified into, for example, 5 levels and by comparing agenerated code amount corresponding to each of the picture frames, whichis obtained in the first coding portion 41, with the initial value ofthe target code value corresponding thereto.

[0111] Incidentally, the level of the activity may be determinedaccording to the degree of deviation between the generated code amountand the average code amount corresponding to each of the picture type,which is determined by averaging the generated code amount obtained bythe preceding correspondingly to each of the picture frames, instead ofthe initial value of the target code amount calculated from the equation(3).

[0112] Further, although it has been described in the foregoingdescription that the activity is determined according to the codeamounts, the activity may be determined by using the magnitudes ofmotion vectors.

[0113] Finally, the target code amount 106 corresponding to each of thepicture frames (or each of the pictures) is determined (step 503)according to the activity corresponding thereto. Practically, the targetcode amount corresponding to each of the picture frames is determined byadjusting the code amount allotted thereto according to the level of theactivity corresponding thereto on the basis of the initial value of thetarget code amount corresponding to each of the picture types. That is,to obtain uniform picture quality after the coding, an amount, which islarger than the initial value of the target code amount, is set as atarget code amount in each of the picture frames, which have highactivity, within a predetermined range of code amounts allotted forcoding a series of picture frames. In contrast, an amount, which issmaller than the initial value of the target code amount, is set as atarget code amount in each of the picture frames each having lowactivity.

[0114] For example, the target code amount corresponding to each of thepicture frames is set by calculating the code amount per GOP from theset total code amount or from the average code amount per unit time andthen distributing this code amount per GOP to each of the picture framesaccording to the activity thereof.

[0115] Incidentally, more uniform picture quality of the coded picturecan be obtained by determining the allocation of the code amount per GOPaccording to the level of the activity corresponding to each of theGOPs.

[0116] Moreover, a code amount corresponding to each of the plural pixelblocks (or slices) of the picture frames is obtained by the precedingperformed in the first coding portion 41. The second code allottingportion 32 determines the target code amount 107 used in codingcorrespondingly to each of the plural pixel blocks (or slices) of thepicture frames by using the code amount corresponding to each of theplural pixel blocks (or slices) of the picture frames and also using thecoding mode corresponding thereto. Practically, the target code amount107 corresponding to each of the plural pixel blocks (or slices) isdetermined by performing the proportional distribution of the targetcode amount 106, which corresponds to each of the picture frames and isdetermined by the first code amount allotting portion 31, according tothe ratio of code amounts among the plural pixel blocks.

[0117] Incidentally, in the case of using an object-based coding asemployed in a MPEG-4 system as a picture coding method, the apparatus isadapted so that the code amount of each object is obtained during theprecoding is performed in the first coding portion. The second codeamount allotting portion 32 determines the target code amount 107correspondingly to each of the objects by using the code amount andcoding mode corresponding to each of the objects, similarly as in thecase of determining the code amount corresponding to each of the pluralpixel blocks (or slices) of the picture frame.

[0118] Next, the coding to be performed in the second coding portion 42is described hereunder. Moreover, the coding is performed in the secondcoding portion 42 according to the GOP structure determined by the GOPstructure determining portion 2 so that generated code amounts meet theconditions concerning the target code amounts allotted in picture frameunits and plural pixel blocks (or slices) by the first code amountallotting portion 313 and the second code amount allotting portion 32.

[0119] The feedforward control method, by which the coding parameters,such as the quantization characteristics, are determined by utilizingthe relation between the coding characteristic and the generated codeamount is used as the coding control method for meeting the conditionsconcerning each of the target code amounts.

[0120] Hereinafter, the method of determining the coding parameters byutilizing the relation between the coding characteristic and thegenerated code amount is described. Generally, there is a tradeoffbetween the picture quality (or coding distortion) and the generatedcode amount of a coded picture. For instance, when the coding distortionis reduced by enhancing the accuracy of the quantization, the generatedcode amount increases. Thus, the coding parameters are determined byutilizing the relation between the coding characteristic and thegenerated code amount, which is obtained when the preceding isperformed, or the preset relation therebetween so that the generatedcode amount meets the conditions concerning the target code amount.

[0121] Further, the quantization characteristics and a variable lengthcoding (VLC) table are determined by estimating the frequencycharacteristics and code amount of to-be-coded picture signals from DCTcoefficients on precoding. Moreover, regarding a pixel block from whichan extremely large amount of codes is generated, the generated codeamount in the case of using the interframe coding (or inter coding) iscompared with that in the case of using the intraframe coding (or intracoding), so that an interframe/intraframe coding switching controloperation is performed during the coding.

[0122] Furthermore, in preparation for the case that the target codeamount is not successfully attained by the feedforward control method,the coding control operation may be performed by employing thecombination of the feedforward control method and the feedback controlmethod of controlling the coding parameters based on the buffer storagecapacity.

[0123] Incidentally, although the detection of a scene change isperformed on each of the picture frames of the number being equal to thedefault value of the size of a GOP in the aforementioned embodiment, thedetection of a scene change may be performed on each of a larger orsmaller number of picture frames.

[0124] Further, when the size of a GOP is determined, the size of theGOP maybe controlled according to the level of the activitycorresponding to each of the picture frames or the magnitudes of theprediction error evaluation values (Ef and Eb). That is, in the casethat the level of the activity is relatively high and the predictionerror evaluation values (Ef and Eb) are relatively large over aplurality of frames, the size of the GOP is reduced. In contrast, in thecase that the level of the activity is relatively low and the predictionerror evaluation values (Ef and Eb) are relatively small over aplurality of frames, the size of the GOP is increased. The coding can beefficiently achieved by performing such a control operation.

[0125] Incidentally, devices based on the GOP structures determined bythe GOP structure determining portion 2 and enabled to generate a targetcode amount in picture frame units and plural pixel block (or slice)units allotted by the first code amount allotting portion 31 and thesecond code amount allotting portion 32 may be employed as the firstcoding portion 41 and the second coding portion 42. For example, thecoding portions 41 and 42 may be constituted by devices obtained byadapting the coding control portion 91 of the conventional picturecoding apparatus illustrated in FIG. 9 in such a manner as to performthe target code amount control operation. Further, other devices may beemployed as such coding portions.

[0126] As described above, in the case of this embodiment, a pluralityof picture frames are constituted as one group according to thecorrelation between picture frames in a picture sequence. Further, acoding mode corresponding to each of the picture frames of this group isdetermined. Moreover, precoding is performed according to the codingmode determined correspondingly to each of the picture frames.Furthermore, the coding of a picture is performed by controlling acoding parameter according to a result of precoding, and to the codingmode. Thus, the preceding is performed on a GOP suitably constituted asa group based on the interframe correlation. Consequently,highly-efficient and high quality coding corresponding to each of GOPssuitably constituted as groups can be performed, as compared with thecase of performing the coding by controlling only the target code amountand the quantization characteristics.

[0127] Consequently, the variation in the coding quality in the pictureframe, the long-term variation in complexity of a picture and thevariation in coding quality corresponding to each of picture frames,which depends upon the presence or absence of a scene change, can bemore effectively suppressed. Moreover, highly efficient coding isachieved with high quality within a restricted code amount.

[0128] Further, in the case of this embodiment, the constitution of theGOP is controlled according to the correlation between the pictureframes. Thus, even in the case of coding instantaneously varying scenesand rapidly moving pictures, the feedback control operation is preventedfrom failing in following the actual variation in the generated codeamount and from breaking down. Consequently, highly efficient coding isachieved within a restricted code amount by suppressing variation in thecoding quality.

[0129] When the present invention is utilized for digital broadcastingservice, the necessary transmission capacity including capacity forpicture information can be reduced. Further, when the present inventionis used for storing pictures in, for example, a DVD, the necessarystorage capacity thereof can be reduced by effective coding.

[0130] Second Embodiment

[0131]FIG. 7 is a block diagram illustrating the configuration ofanother picture coding apparatus according to the present invention. InFIG. 7, reference numeral 43 designates a third coding portion. The restof the constituent elements of the apparatus are the same as thecorresponding elements illustrated in FIG. 1. The third coding portion43 is a common coding device serving as both the encoder used forpreceding and the encoder used for coding. Incidentally, the thirdcoding portion 43 uses a coding parameter used for preceding, whichdiffers from a coding parameter used for coding. That is, parametersrespectively corresponding to the coding modes are preliminarily set.Thus, when performing the preceding, the portion 43 uses the presetparameter for preceding.

[0132] With such a configuration, the scale of the apparatus can bedecreased. This embodiment is effective especially in the case thatreal-time processing is unnecessary.

[0133]FIG. 8 is a block diagram illustrating the configuration of stillanother picture coding apparatus according to the present invention. InFIG. 8, reference numeral 12 designates a second scene change detectingportion, and 44 denotes a fourth coding portion. The rest of theapparatus is similar to the corresponding part of the apparatus of FIG.8. The fourth coding portion 44 is a common coding device serving asboth the encoder used for preceding and the encoder used for coding.Moreover, the fourth coding portion 44 is adapted to perform the motioncompensation interframe prediction operation for obtaining theprediction error evaluation values Ef and Eb on detecting a scenechange.

[0134] With such a configuration, the scale of the apparatus can bedecreased. Also, this embodiment is effective especially in the casethat real-time processing is unnecessary.

[0135] Incidentally, devices based on the GOP structures determined bythe GOP structure determining portion 2 and enabled to generate a targetcode amount in picture frame units and plural pixel block (or slice)units allotted by the first code amount allotting portion 31 and thesecond code amount allotting portion 32 may be employed as the thirdcoding portion 43 and the fourth coding portion 44. For example, thecoding portions 43 and 44 may be constituted by devices obtained byadapting the coding control portion 91 of the conventional picturecoding apparatus illustrated in FIG. 9 in such a manner as to performthe target code amount control operation. Further, other devices may beemployed as such coding portions.

[0136] Incidentally, according to the present invention, the concept of“frame” includes a “field” of a video image represented by what iscalled a television signal. That is, the present invention provides anapparatus having constituent elements for detecting the correlationbetween fields represented by a television signal and for grouping thefields into groups. Further, such an apparatus has effects similar tothose of the aforementioned embodiments of the present invention.

[0137] Further, the present invention may be practiced by using softwareand firmware, which are caused by a processor to function, instead ofbeing implemented by using the apparatuses described in the foregoingdescription of the embodiments. A program for performing the method ofthe present invention may be generated and recorded on a recordingmedium. The program itself, or the function of this method can beprovided through communication media, such as the Internet.

[0138] As described above, according to the present invention, there isprovided a picture coding apparatus that comprises group structuredetermining means for constituting a plurality of picture frames as onegroup according to the correlation between picture frames in a picturesequence and for determining a coding mode corresponding to each of thepicture frames of this group, preceding means for performing precedingaccording to the coding mode determined by this group structuredetermining means correspondingly to each of the picture frames, andcoding means for performing coding of a picture by controlling a codingparameter according to a result of preceding, which is obtained by thispreceding means, and to the coding mode determined by the groupstructure determining means. Thus, a target code amount in the case ofperforming coding is determined according to a code amount, which isobtained by performing preceding on a GOP suitably constituted as agroup based on the interframe correlation, and the exsistence of a scenechange, and a coding control operation can be performed. Consequently,highly-efficient and high quality coding corresponding to each of GOPssuitably constituted as groups can be performed within a restricted codeamount.

[0139] Further, desired picture quality is realized in each of regionsof a picture frame by setting a target code amount correspondingly toeach of the regions therein and by performing coding so that a generatedcode amount is equal to the target code amount. Moreover, the coding ofeach of the regions in the picture frame is achieved with uniformquality.

What is claimed is:
 1. A picture coding apparatus comprising: a groupstructure determining portion for constituting a plurality of pictureframes as a group according to correlation between the picture frames ina picture sequence, the group structure determining portion fordetermining a coding mode corresponding to each of the picture frames ofthe group; a preceding portion for performing preceding according to thecoding mode determined by the group structure determining portioncorrespondingly to each of the picture frames; and a coding portion forperforming coding of a picture by controlling a coding parameteraccording to a result of the preceding obtained by the preceding portionand to the coding mode determined by the group structure determiningportion.
 2. The picture coding apparatus according to claim 1 , furthercomprising a scene change detecting portion for evaluating correlationbetween the picture frames in the picture sequence and for detecting,when there is a part having low interframe correlation, the part as ascene change part, wherein the group structure determining portion setsthe plurality of picture frames as the group according to the detectedscene change part.
 3. The picture coding apparatus according to claim 2, wherein the scene change detecting portion performs a forward motioncompensation interframe prediction and a backward motion compensationinterframe prediction on each frame of an input picture sequence havinga plurality of frames to detect a scene change by evaluating results ofboth the forward and backward predictions.
 4. The picture codingapparatus according to claim 2 , wherein the scene change detectingportion detects scene change by calculating a prediction errorevaluation value for each of the regions of the frames and evaluatingthe calculated prediction error evaluation value for each of the frames.5. The picture coding apparatus according to claim 1 , wherein the groupstructure determining portion sets a default value of the number offrames when the group is constituted; when a part having low interframecorrelation exists, the group structure determining portion sets thenumber of frames of the group so that a boundary of the group is locatedin the part having low interframe correlation; and when the number ofconsecutive picture frames each having high interframe correlationexceeds the default value, the group structure determining portion setsthe number of frames of the group at a value larger than the defaultvalue.
 6. The picture coding apparatus according to claim 1 , wherein,when determining the coding mode of each of the picture frames of thegroup, the group structure determining portion sets a frame intervalbetween a unidirectional prediction coded frame and an interframe codedframe or a default value of the frame interval therebetween and allots aunidirectional motion compensation interframe prediction coding mode toa corresponding picture frame, and also allots a unidirectionalinterframe prediction coding mode preferentially to a picture framewhose unidirectional motion compensation interframe prediction errorevaluation value is less than a predetermined value.
 7. The picturecoding apparatus according to claim 1 , wherein the preceding portionoutputs activity for each of the picture frames as a part of the resultof preceding, and the coding portion performs coding of a picture bycontrolling the coding parameter according to the activity correspondingto each of the picture frames.
 8. The picture coding apparatus accordingto claim 1 , further comprising a code amount allotting portion forallotting a target code amount to each of the picture frames accordingto the result of preceding performed by the preceding portion and to thecoding mode determined by the group structure determining portion foreach of the picture frames of the group, and the coding portion performscoding of each of the picture frames by controlling the coding parameteraccording to the target code amount allotted by the code amountallotting portion to each of the picture frames.
 9. The picture codingapparatus according to claim 8 , wherein the code amount allottingportion comprises: a first code amount allotting portion for allotting atarget code amount according to the result of preceding performed by thepreceding portion and to the coding mode determined by the groupstructure determining portion for each of the picture frames of thegroup; and a second code amount allotting portion for allotting thetarget code amount, which is allotted by the first code amount allottingportion correspondingly to each of the picture frames, according to acode amount of each of regions, which are used in the precedingperformed by the preceding portion, of the picture frames as a targetcode amount for each of regions of the picture frames, wherein thecoding portion performs coding by controlling the coding parameteraccording to the target code amount corresponding to each of the pictureframes and to the target code amount for each of the regions of thepicture frames.
 10. The picture coding apparatus according to claim 8 ,wherein the code amount allotting portion allots an initial value to thetarget code amount for each of the picture frames, and determinesactivity corresponding to each of the picture frames by comparing theallotted initial value of the target code amount with an amount ofcodes, which are obtained by the preceding and generated for each of thepicture frames, and sets a target code amount for each of the pictureframes according to the activity.
 11. A picture coding methodcomprising: constituting a plurality of picture frames as a groupaccording to correlation between the picture frames in a picturesequence; determining a coding mode for each of the picture frames ofthe group, performing preceding according to the coding mode determinedfor each of the picture frames; and performing coding of a picture bycontrolling a coding parameter according to a result of the precedingand to the determined coding.
 12. The picture coding method according toclaim 11 , further comprising: allotting a target code amount to each ofthe picture frames according to the result of preceding and to thecoding mode determined for each of the picture frames of the group; andperforming coding of each of the picture frames by controlling thecoding parameter according to the target code amount allotted to each ofthe picture frames.
 13. The picture coding method according to claim 12, further comprising: allotting a target code amount according to theresult of preceding and to the coding mode determined for each of thepicture frames of the group; and allotting the target code amount foreach of the picture frames according to a code amount of each ofregions, which are used in the preceding, of the picture frames as atarget code amount corresponding to each of regions of the pictureframes; and performing coding by controlling the coding parameteraccording to the target code amount for each of the picture frames andto the target code amount for each of the regions of the picture frames.14. A recording medium recording a picture coding program to be executedin a computer, the picture coding program comprising: constituting aplurality of picture frames as a group according to correlation betweenthe picture frames in a picture sequence; determining a coding mode foreach of the picture frames of the group; performing preceding accordingto the determined coding mode corresponding to each of the pictureframes; and performing coding of a picture by controlling a codingparameter according to a result of the preceding and to the determinedcoding mode.
 15. The recording midium recording the computer programaccording to claim 14 , the computer program further comprising:allotting a target code amount to each of the picture frames accordingto the result of preceding and to the coding mode determined for each ofthe picture frames of the group; and performing coding of each of thepicture frames by controlling the coding parameter according to thetarget code amount allotted to each of the picture frames.
 16. Therecording midium recording the computer program according to claim 15 ,the computer program further comprising: allotting a target code amountaccording to the result of preceding and to the coding mode determinedfor each of the picture frames of the group; and allotting the targetcode amount for each of the picture frames according to a code amount ofeach of regions, which are used in the preceding, of the picture framesas a target code amount corresponding to each of regions of the pictureframes; and performing coding by controlling the coding parameteraccording to the target code amount for each of the picture frames andto the target code amount for each of the regions of the picture frames.